function load() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/load.do",
        error : function(res) {
            alert(res);
        }
    });
}

function login() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/login.do",
        data: $('#LoginForm').serialize(),
        success: function (res) {
            $('#LoginRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#LoginRes").text(JSON.stringify(res, null, 4))
        }
    });
}

function userListAll() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/getUserListAll.do",
        success: function (res) {
            $('#UserListAllRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#UserListAllRes").text(JSON.stringify(res, null, 4))
        }
    });
}


function userListByUserType() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/getUserListByUserType.do",
        data: $('#UserListByUserTypeForm').serialize(),
        success: function (res) {
            $('#UserListByUserTypeRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#UserListByUserTypeRes").text(JSON.stringify(res, null, 4))
        }
    });
}


function userAdd() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/userAdd.do",
        data: $('#UserAddForm').serialize(),
        success: function (res) {
            $('#UserAddRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#UserAddRes").text(JSON.stringify(res, null, 4))
        }
    });
}




// -------------------------------------------------------------------------------------------------------------------


function modelAdd() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/modelAdd.do",
        data: $('#ModelAddForm').serialize(),
        success: function (res) {
            $('#ModelAddRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#ModelAddRes").text(JSON.stringify(res, null, 4))
        }
    });
}


function modelListAll() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/getModelListAll.do",
        success: function (res) {
            $('#ModelListAllRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#ModelListAllRes").text(JSON.stringify(res, null, 4))
        }
    });
}

function modelListMine() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/getModelListMine.do",
        success: function (res) {
            $('#ModelListMineRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#ModelListMineRes").text(JSON.stringify(res, null, 4))
        }
    });
}

function modelListByOwner() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/getModelListByOwner.do",
        data: $('#ModelListByOwnerForm').serialize(),
        success: function (res) {
            $('#ModelListByOwnerRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#ModelListByOwnerRes").text(JSON.stringify(res, null, 4))
        }
    });
}

function modelByUuid() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/getModelByUuid.do",
        data: $('#ModelByUuidForm').serialize(),
        success: function (res) {
            $('#ModelByUuidRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#ModelByUuidRes").text(JSON.stringify(res, null, 4))
        }
    });
}


function ModelUpdate() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/modelUpdate.do",
        data: $('#ModelUpdateForm').serialize(),
        success: function (res) {
            $('#ModelUpdateRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#ModelUpdateRes").text(JSON.stringify(res, null, 4))
        }
    });
}


// -------------------------------------------------------------------------------------------------------------------



function jobAdd() {
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/jobAdd.do",
        data: $('#JobAddForm').serialize(),
        success: function (res) {
            $('#JobAddRes').text(JSON.stringify(res, null, 4))
        },
        error : function(res) {
            $("#JobAddRes").text(JSON.stringify(res, null, 4))
        }
    });
}